<?php

declare(strict_types=1);

namespace TpAmisAdmin\Admin\command;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use TpAmisAdmin\Admin\common\utils\JwtAuth;

class BuildCrud extends Command
{
  protected function configure()
  {
    // 指令配置
    $this->setName('bcrud')
      ->setDescription('the bcrud command11');
  }

  protected function execute(Input $input, Output $output)
  {
    // 指令输出
    $output->writeln('bcrud');
    $token = JwtAuth::getInstance()->createToken(1, 'admin1', ['id' => 1, 'account' => 'account']);
    dump($token);
    $token = JwtAuth::getInstance()->parseToken($token['token']);
    dump($token);
    dump(JwtAuth::getInstance()->verifyToken());

  }
}
